const nunjucks = require('nunjucks');
/**
 * 逻辑判断 if else 
 */
nunjucks.configure({
    autoescape:false
});
//src must be a string or an object describing the source
let result = nunjucks.renderString(`
{% if score >90 %}
优秀
{% elseif score >80 %}
良好
{% elseif score >60 %}
及格
{% else %}
不及格
{% endif %}
`
,{
    score:91
});
console.log(result);